<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>请求demo</title>
</head>

<body>

<form id="userForm" action="#" method="post">
    username：<input type="text" id ="userName" name="userName" value="21088888"/><br/><br>
    email：<input type="text" id ="email" name="email" value="zhaoHENG@163.com"/><br/><br/>
    age：<input type="text" id ="age" name="age" value="18"/><br/><br/>

    <input type="reset" value="重置"/>&nbsp;&nbsp;
    <input type="button" id ="sub" value="提交">
</form>

</body>
<script src="jquery.min.js"></script>
<script type="text/javascript">

    $("#sub").click(
        function(){
            var userName = $("#userName").val();
            var email = $("#email").val();
            var age = $("#age").val();
            $.ajax({
                type : "POST",
                url:'http://127.0.0.1:8080/merchant_wap/pastOrder/filterCsF2',
                dataType : "json",
                data : {
                    "userName":userName,
                    "age":age,
                    "email":email
                },
                success : function(data) {
                    alert("33");
                },
                error : function(data) {
                    alert("cccc"+data.email);
                }
            });
        }
    );
</script>
</html>

